<?php

    require_once(realpath(dirname(__FILE__).'/../../../globals.inc'));
    global $mikron;
    $mikron->Page->StartBody();

    $error_xml = $mikron->Cache->getCache('error');
    if(is_null($error_xml))
    {
        $mikron->Tools->GoToPage('/infomat/index.php');
    }

    ?><p align="center"><?php
    $dom1 = new DomDocument();
    $dom1->loadXML($error_xml);
    $xml_error = $dom1->getElementsByTagName('error');

    foreach($xml_error as $error_element)
    {
        $code = $error_element->getAttribute("code");
        $text = $error_element->textContent;
        $mikron->Cache->setCache('error_text', $text);
        $mikron->Tools->GoToPage('/infomat/index.php');
    }

    ?>

    <br>Перейти на <a href="directionslist.php">начало</a>
    </p>
    
<?php $mikron->Page->EndBody(); ?>
